//
//  MenuButton.m
//  QSBK
//
//  Created by Eric Wang on 4/17/15.
//  Copyright (c) 2015 Eric Wang. All rights reserved.
//

#import "MenuButton.h"

@implementation MenuButton

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if(self)
    {
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
    }
    return self;
}
-(CGRect)imageRectForContentRect:(CGRect)contentRect
{
    CGFloat x = 0;
    CGFloat y = contentRect.size.height*9/10;
    CGFloat w = contentRect.size.width;
    CGFloat h = contentRect.size.height/10;
    return CGRectMake(x, y, w, h);
}

-(CGRect)titleRectForContentRect:(CGRect)contentRect
{
    CGFloat x = 0;
    CGFloat y = 0;
    CGFloat w = contentRect.size.width;
    CGFloat h = contentRect.size.height*9/10;
    return CGRectMake(x, y, w, h);
}
@end
